AI Verified

Name

Overide "Return to shop" URL

About

Change the destination of the "Return to shop" button on the WooCommerce Cart Page. Useful if you want it to be different from the Shop Page defined in WooCommerce Settings.

Language

PHP

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

Add to Code Snippets as 'Functions'. Replace the '/shop/' URL in the code snipept with your preferred URL.

Codevault

Snug Snippets

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.4

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Website/ Profile URL:

https://snugsite.com.au/blog/

History

Last modified:

21/08/2024

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Overide "Return to shop" URL

 
                    
1add_filter('woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url');
2 
3function wc_empty_cart_redirect_url() {
4 return esc_url(home_url('/shop/'));
5}

0

Related Snippets

Please see some snippets below related to this snippet..

WooCommerce

AI Verified

1

WooCommerce Login Redirect

Added: 1 year ago

Last Updated: 2 months ago

By default, when a user logs into their account on your WooCommerce website, they are redirected to their dashboard on the My Account page. This guide shows you how to change this and redirect the use...

WooCommerce

Unverified

1

Automatically Cancel WooCommerce Failed Orders Older Than One Week

Added: 3 weeks ago

Last Updated: 3 weeks ago

This snippet automatically cancels WooCommerce orders that have a 'failed' status for more than one week. The process is run daily to keep your order management clean and up-to-date.

WooCommerce

AI Verified

2

Redirect customer after they log-in

Added: 2 years ago

Last Updated: 2 months ago

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WooCommerce

AI Verified

1

Add Text Above WooCommerce Payment Options

Added: 1 year ago

Last Updated: 9 months ago

Show some text above the Payment Method Selection in WooCommerce Checkout.

WooCommerce

AI Verified

0

WooCommerce Breadcrumb Home Link and Anchor Text

Added: 3 months ago

Last Updated: 3 months ago

Change the default "Home" link in WooCOmmerce Breadcrumbs to a different URL with a different Anchor Text.

WooCommerce

AI Verified

0

New Badge on WooCommerce Products

Added: 1 year ago

Last Updated: 1 year ago

Add a "New" Badge to recent Published Products in WooCommerce